const templateMinxin = {
  data() {
    return {
      list: [],
      formData: {}, // 顶部表单填写项
      defaultInfo: {} // 编辑的数据源
    }
  },
  methods: {
    handleQueryBtnClick(formData) {
      // 查询
      // console.log(formData)
      this.formData = formData
      this.contentTableConfig.pageInfo.currentPage = 1
      this.getList()
    },
    handleResetBtnClick(formData) {
      // 重置
      this.formData = formData
      this.contentTableConfig.pageInfo.currentPage = 1
      this.getList()
    },
    handleEditBtnClick(item) {
      // 编辑
      this.defaultInfo = { ...item }

      this.$refs.pageModalRef.dialogVisible = true

      console.log(this.$refs.pageModalRef.dialogVisible)
    },
    handleNewBtnClick() {
      // 新增
      this.defaultInfo = {}
      this.$refs.pageModalRef.dialogVisible = true
    }
  },
  created() {
    this.getList()
  },
  watch: {
    'contentTableConfig.pageInfo'(val) {
      this.getList()
    }
  }
}
export default templateMinxin
